package org.student.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.student.dao.ISubjectArrangeDao;
import org.student.entity.StuSys_Arrange;
import org.student.entity.StuSys_ClassInfo;
import org.student.entity.StuSys_Subject;
import org.student.entity.StuSys_SubjectArrange;
import org.student.entity.StuSys_Teacher;

@Component("SubjectArrangeService")
public class SubjectArrangeService implements ISubjectArrangeDao{
	
	private ISubjectArrangeDao iSubjectArrangeDao ;

	public ISubjectArrangeDao getiSubjectArrangeDao() {
		return iSubjectArrangeDao;
	}

	@Resource(name = "SubjectArrangeDaoImpl")
	public void setiSubjectArrangeDao(ISubjectArrangeDao iSubjectArrangeDao) {
		this.iSubjectArrangeDao = iSubjectArrangeDao;
	}

	/**
	 * 
	 * �γ̰�����Ϣ����
	 * @param subjectArrange
	 * @throws Exception
	 */
	@Override
	public void subArrangeInfoSave(StuSys_SubjectArrange subjectArrange)
			throws Exception {
		this.iSubjectArrangeDao.subArrangeInfoSave(subjectArrange) ;
	}

	/**
	 * 
	 * ��ȡ���Ҽ���
	 * @param subjectArrange
	 * @throws Exception
	 */
	@Override
	public List<StuSys_Arrange> getAllArranges() throws Exception {
		return iSubjectArrangeDao.getAllArranges() ;
	}

	/**
	 * 
	 * ��ȡ�༶����
	 * @param subjectArrange
	 * @throws Exception
	 */
	@Override
	public List<StuSys_ClassInfo> getAllClassInfos() throws Exception {
		return iSubjectArrangeDao.getAllClassInfos() ;
	}


	/**
	 * 
	 * ��ȡ�γ̼���
	 * @param subjectArrange
	 * @throws Exception
	 */
	@Override
	public List<StuSys_Subject> getAllSubjects() throws Exception {
		return iSubjectArrangeDao.getAllSubjects() ;
	}

	/**
	 * 
	 * ��ȡ��ʦ����
	 * @param subjectArrange
	 * @throws Exception
	 */
	@Override
	public List<StuSys_Teacher> getAllTeachers() throws Exception {
		return iSubjectArrangeDao.getAllTeachers() ;
	}
	
	// 取得所有课程安排信息
	@Override
	public List<StuSys_SubjectArrange> getSubjects() throws Exception {
		return this.iSubjectArrangeDao.getSubjects() ;
	}

	// 根据编号删除课程安排信息
	@Override
	public void deleteSubjectById(int id) throws Exception {
		this.iSubjectArrangeDao.deleteSubjectById(id) ;
	}

	// 根据编号取得课程安排信息
	@Override
	public StuSys_SubjectArrange getSubjectById(int id) throws Exception {
		return this.iSubjectArrangeDao.getSubjectById(id) ;
	}

	@Override
	public List<StuSys_SubjectArrange> getSubjectByKeyWord(String keyWord)
			throws Exception {
		return this.iSubjectArrangeDao.getSubjectByKeyWord(keyWord) ;
	}

}
